var fastMailTable;
function getFastMailList() {
    if (typeof fastMailTable !== 'undefined') {
    	fastMailTable.fnPageChange('first');
        return;
    }
    var i = 1;
    fastMailTable = $("#fastMailList").DataTable({
        "sAjaxSource": _path + "/fastmail/queryByPage",           /* e  /fastmail/queryByPage  及push中name  value 变量名*/
        "fnServerParams": function (aoData) {
            aoData.push(
                { "name": "company", "value": $("#company").val() },
                { "name": "area", "value": $("#area").val() },
                { "name": "brand", "value": $("#brand").val() }
            );
        },
        "sServerMethod": "POST",
        "sAjaxDataProp": "dataList",
        "fnCreatedRow": function () {
            i++;
        },
        "fnPreDrawCallback": function () {
            i = 1;
        },
        "aoColumns": [
            { "sTitle": "编号", "mData":"id", "sWidth": "2%"},    
            { "sTitle": "公司名称", "mData": "company", "sWidth": "10%" },
            { "sTitle": "区域", "mData": "area", "sWidth": "10%" },
            { "sTitle": "品牌", "mData": "brand", "sWidth": "10%" },
            { "sTitle": "地址", "mData": "address", "sWidth": "10%" },
            { "sTitle": "全国统一客服热线", "mData": "telephone", "sWidth": "10%" },
            { "sTitle": "查询电话", "mData": "queryphone", "sWidth": "10%" },
            { "sTitle": "备注", "mData": "remark", "sWidth": "10%" },            
            { "sTitle": "操作", "sWidth": "10%",
                "mData": function (data) {
                    var status = '<a href="' + _path + '/fastmail/edit/' + data.id + '" class="btn default btn-xs purple"><i class="fa fa-edit" title="编辑"></i></a>&nbsp;';
                    status += '&nbsp;<a href="' + _path + '/fastmail/del/' + data.id + '"  class="btn default btn-xs red"><i class="fa fa-trash-o" title="删除"></i></a>';
                    return status;
                }
            }
        ]
    });
}